{template 'common/header'}
{template 'nav_bar'}
<div class="panel panel-default">
	 <div class="panel-heading">
     	{$panel_heading}
     </div>
	<div class="panel-body">
		<form class="form-horizontal form" action="" method="post" enctype="multipart/form-data" onsubmit="return formcheck(this)">
			<div class="panel panel-default">
				<div class="panel-body table-responsive">
					<table class="table table-hover">
						<thead>
							<tr>
								<th style="width:80px;">编号</th>
								<th>标题</th>
								<!-- <th>点击次数</th> -->
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
						{loop $list $key $row}
						<tr>
							
							<td>NO.{php echo $key+1}</td>
							<td>
								<div class="type-parent">{$row['title']}&nbsp;&nbsp;</div>
							</td>
							<!-- <td>
								<div class="type-parent">{$row['click']}+&nbsp;&nbsp;</div>
							</td> -->
							<td>
								{if $row['status']==1}
								<span class='label label-success'>显示</span>
								{else}
								<span class='label label-danger'>隐藏</span>
								{/if}
							</td>
							<td>
								<a href="{php echo $this->createWebUrl('cat', array('act'=>'cat','op' => 'post', 'id' => $row['id']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" title="编辑"><i class="fa fa-edit"></i></a>&nbsp;&nbsp;
								<a href="{php echo $this->createWebUrl('cat', array('act'=>'cat','op' => 'delete', 'id' => $row['id']))}" onclick="return confirm('确认删除吗？');return false;" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" title="删除"><i class="fa fa-times"></i></a>
							</td>
						</tr>
						{/loop}
						<tr>
							<td></td>
							<td colspan="4">
								<a href="{php echo $this->createWebUrl('cat', array('act'=>'cat','op' => 'post'))}"><i class="fa fa-plus-sign-alt"></i> 添加新链接</a>
							</td>
						</tr>
						<tr>
							<td></td>
							<td colspan="4">
								<input name="submit" type="submit" class="btn btn-primary" value="提交">
								<input type="hidden" name="token" value="{$_W['token']}" />
							</td>
						</tr>
						</tbody>
					</table>
				</div>
           </div>
		</form>
	</div>
</div>			
<script type="text/javascript">
	require(['jquery.ui', 'bootstrap.switch', 'util'], function($, $, u){
		$(function(){
			$(":checkbox[name='chongfu']").bootstrapSwitch();
		});
	});
</script>
{template 'common/footer'}